<?php

echo "开始拼接模板";



//这里必须要openid
//$openid               = $_REQUEST['openid'];

//发送消息模板的地址
echo $url = "http://oa.enpingshi.com/api/wechat_mp/send_message_model.php";




$post_data = array(
    "touser"=>$v['openid'], //推送给谁,openid
    //"touser"=>'oUaqG0dZdR4ITehiwDOLoCxcn49w', //推送给工作号
    "template_id"=>"zvH8KjMX3lrQxKVROe8Oo41Y9XN_Hk4OCfUZ0IozWgs", //微信后台的模板信息id
    "url"=>$checkurl, //
    "data"=> array(
        "first" => array(
            "value"=>"网站访问异常（内容变化或无内容），请查看",
            "color"=>"#173177"
        ),
        "keyword1"=>array(
            "value"=>date("Y-m-d"),//时间
            "color"=>"#173177"
        ),

        "keyword2"=>array(
            "value"=>$checkurl."网站内容发生变化，请查看访问是否正常",
            "color"=>"#173177"
        ),
        "remark"=> array(
            "value"=>$checkurl."网站内容发生变化，请查看访问是否正常",
            "color"=>"#173177"
        ),
    )
);

			$sql_data = serialize($post_data);
			$data['content'] = $sql_data;
            echo  $re_back = send_wx_sms($url , $data);
			echo $re_back_arr = json_decode($re_back, true);
            
?>

